package user

import (
	"context"
	"srv/config"
	"srv/internal/model/dao"
	__ "srv/proto"
)

// 实现方法
func (s *UserService) GvaExamAdd(ctx context.Context, req *__.GvaExamAddRequest) (resp *__.GvaExamAddResponse, err error) {
	exam := dao.GvaExam{
		Type:       int8(req.Type),
		TitleType:  int8(req.TitleType),
		TitleIntro: req.TitleIntro,
		True:       int8(req.True),
		Big:        int8(req.Big),
	}
	config.DB.Create(&exam)
	return &__.GvaExamAddResponse{Id: int64(exam.ID)}, nil
}
